package com.yanqu.road.logic.bussiness.rank;

import com.yanqu.road.entity.beautyescort.rank.EscortWeekServerGroup;
import com.yanqu.road.entity.rank.ServerRank;
import com.yanqu.road.entity.rank.UnionActivityRank;
import com.yanqu.road.entity.rank.UnionRank;
import com.yanqu.road.entity.rank.UserRank;
import com.yanqu.road.entity.rank.cross.CrossActivityTeamRank;
import com.yanqu.road.entity.rank.cross.CrossUnionActivityRank;
import com.yanqu.road.entity.rank.cross.CrossUnionWeekRank;
import com.yanqu.road.entity.rank.cross.CrossUserRank;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class RankBussiness {
	public static LinkedList<UserRank> getUserRankList(int rankType) {
		return DaoHelper.getRankDaoImpl().getUserRankListByType(rankType);
	}

	public static boolean updateUserRankList(List<UserRank> rankList) {
		return DaoHelper.getRankDaoImpl().updateUserRankList(rankList);
	}

	public static Map<Long, Map<Integer, Map<Integer, LinkedList<CrossUserRank>>>> getCrossUserRankListMap() {
		return DaoHelper.getCrossRankDaoImpl().getCrossUserRankListMap();
	}

	public static boolean updateCrossUserRankList(long serverId, List<CrossUserRank> rankList) {
		return DaoHelper.getCrossRankDaoImpl().updateCrossUserRankList(serverId, rankList);
	}

	public static Map<Long, LinkedList<UnionRank>> getCrossUnionRankListMap() {
		return DaoHelper.getCrossUnionRankDaoImpl().getCrossUnionRankListMap();
	}

	public static boolean updateCrossUnionRankList(long serverId, List<UnionRank> rankList) {
		return DaoHelper.getCrossUnionRankDaoImpl().updateCrossUnionRankList(serverId, rankList);
	}

	public static Map<Long, Map<Integer, LinkedList<CrossUserRank>>> getCrossActivityRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossActivityRankDaoImpl().getCrossActivityRankListMap(activityIdList);
	}

	public static boolean updateCrossActivityRankList(long serverId, List<CrossUserRank> rankList) {
		return DaoHelper.getCrossActivityRankDaoImpl().updateCrossActivityRankList(serverId, rankList);
	}


	public static Map<Integer,LinkedList<ServerRank>> getCrossServerRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossActivityRankDaoImpl().getCrossServerRankListMap(activityIdList);
	}

	public static boolean updateCrossServerRankList(int activityId,List<ServerRank> rankList) {
		return DaoHelper.getCrossActivityRankDaoImpl().updateCrossServerRankList(activityId,rankList);
	}

	public static Map<Integer, LinkedList<CrossUserRank>> getCrossTradeWarRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossTradeWarRankDaoImpl().getCrossTradeWarRankListMap(activityIdList);
	}

	public static boolean updateCrossTradeWarRankList(List<CrossUserRank> rankList) {
		return DaoHelper.getCrossTradeWarRankDaoImpl().updateCrossTradeWarRankList( rankList);
	}

	public static Map<Integer, LinkedList<UnionActivityRank>> getCrossTradeWarUnionRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossTradeWarUnionRankDaoImpl().getCrossTradeWarUnionRankListMap(activityIdList);
	}

	public static boolean updateCrossTradeWarUnionRankList(int activityId, List<UnionActivityRank> rankList) {
		return DaoHelper.getCrossTradeWarUnionRankDaoImpl().updateCrossTradeWarUnionRankList(activityId, rankList);
	}

	//跨服盐场
	public static Map<Integer, LinkedList<CrossUserRank>> getCrossOreWarRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossOreWarRankDaoImpl().getCrossOreWarRankListMap(activityIdList);
	}

	public static Map<Integer, LinkedList<CrossUserRank>> getCrossRelationRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossOreWarRankDaoImpl().getCrossRelationRankListMap(activityIdList);
	}

	public static boolean updateCrossOreWarRankList(List<CrossUserRank> rankList) {
		return DaoHelper.getCrossOreWarRankDaoImpl().updateCrossOreWarRankList( rankList);
	}

	public static boolean updateCrossRelationRankList(List<CrossUserRank> rankList) {
		return DaoHelper.getCrossOreWarRankDaoImpl().updateCrossRelationRankList( rankList);
	}

	public static Map<Integer, LinkedList<UnionActivityRank>> getCrossOreWarUnionRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossOreWarUnionRankDaoImpl().getCrossOreWarUnionRankListMap(activityIdList);
	}

	public static Map<Integer, LinkedList<UnionActivityRank>> getCrossRelationUnionRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossOreWarUnionRankDaoImpl().getCrossRelationUnionRankListMap(activityIdList);
	}

	public static boolean updateCrossOreWarUnionRankList(int activityId, List<UnionActivityRank> rankList) {
		return DaoHelper.getCrossOreWarUnionRankDaoImpl().updateCrossOreWarUnionRankList(activityId, rankList);
	}

	public static boolean updateCrossRelationUnionRankList(int activityId, List<UnionActivityRank> rankList) {
		return DaoHelper.getCrossOreWarUnionRankDaoImpl().updateCrossRelationUnionRankList(activityId, rankList);
	}


    public static Map<Integer, LinkedList<CrossUnionActivityRank>> getCrossUnionActivityRankListMap(List<Integer> activityIdList) {
        return DaoHelper.getCrossUnionActivityRankDaoImpl().getCrossUnionActivityRankListMap(activityIdList);
    }

    public static boolean updateCrossUnionActivityRankList(List<CrossUnionActivityRank> rankList) {
        return DaoHelper.getCrossUnionActivityRankDaoImpl().updateCrossUnionActivityRankList(rankList);
    }

	public static Map<Integer, LinkedList<CrossUserRank>> getCrossActivityUserRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossActivityUserRankDaoImpl().getCrossActivityUserRankListMap(activityIdList);
	}

	public static boolean updateCrossActivityUserRankList(List<CrossUserRank> rankList) {
		return DaoHelper.getCrossActivityUserRankDaoImpl().updateCrossActivityUserRankList(rankList);
	}

	public static Map<Integer, Map<Integer, LinkedList<CrossUserRank>>> getCrossActivityNewRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossActivityNewRankDaoImpl().getCrossActivityNewRankListMap(activityIdList);
	}

	public static boolean updateCrossActivityNewRankList(List<CrossUserRank> rankList, int conditionType) {
		return DaoHelper.getCrossActivityNewRankDaoImpl().updateCrossActivityNewRankList(rankList, conditionType);
	}

	public static Map<Integer, Map<Integer, Map<Integer, Map<Integer, LinkedList<CrossUserRank>>>>> getCrossGroupWeekRankListMap(int beginWeek, int endWeek){
		return DaoHelper.getCrossGroupWeekRankDaoImpl().getCrossGroupWeekRankListMap(beginWeek, endWeek);
	}

	public static boolean updateCrossGroupWeekRankList(LinkedList<CrossUserRank> newRankList, int groupId, int weekId) {
		return DaoHelper.getCrossGroupWeekRankDaoImpl().updateCrossGroupWeekRankList(newRankList, groupId, weekId);
	}

	public static boolean updateUnionWarRankList(int activityId, int phase, List<UnionActivityRank> rankList) {
		return DaoHelper.getCrossUnionWarRankDaoImpl().updateCrossUnionWarRankList(activityId, phase, rankList);
	}

	public static Map<Integer, Map<Integer, Map<Integer, LinkedList<UnionActivityRank>>>> getCrossUnionWarRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossUnionWarRankDaoImpl().getCrossUnionWarRankListMap(activityIdList);
	}

	public static Map<Long, Map<Integer, LinkedList<CrossUserRank>>> getCrossMatchWeekRankMap(int beginWeek, int endWeek) {
		return DaoHelper.getCrossMatchWeekRankDaoImpl().getCrossMatchWeekRankMap(beginWeek, endWeek);
	}

	public static boolean updateCrossMatchWeekRankList(LinkedList<CrossUserRank> newRankList, long groupId, int weekId) {
		return DaoHelper.getCrossMatchWeekRankDaoImpl().updateCrossMatchWeekRankList(newRankList, groupId, weekId);
	}


	public static boolean updateEscortCrossGroupWeekUnionRankList(LinkedList<CrossUnionWeekRank> newRankList, int groupId, int weekId) {
		return DaoHelper.getCrossEscortWeekRankDaoImpl().updateEscortCrossGroupWeekUnionRankList(newRankList, groupId, weekId);
	}

	public static Map<Integer, Map<Integer, LinkedList<CrossUnionWeekRank>>> getEscortWeekRankListModelMap(int preWeekId, int thisWeekId) {
		return DaoHelper.getCrossEscortWeekRankDaoImpl().getCrossGroupWeekRankListMap(preWeekId, thisWeekId);
	}

	public static boolean updateCrossActivityTeamRankList(List<CrossActivityTeamRank> rankList, int conditionType) {
		return DaoHelper.getCrossActivityTeamRankDaoImpl().updateCrossActivityTeamRankList(rankList, conditionType);
	}

	public static Map<Integer, Map<Integer, LinkedList<CrossActivityTeamRank>>> getCrossActivityTeamRankListMap(List<Integer> activityIdList) {
		return DaoHelper.getCrossActivityTeamRankDaoImpl().getCrossActivityTeamRankListMap(activityIdList);
	}
}
